<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0%;
        }
        .container {
            width: 1200px;
            margin:0 auto;


        }
        .box{
            box-sizing:border-box;/* 盒模型设置为怪异盒模型（IE盒模型） */
            border:1px solid #000;
            margin:10px;
            padding: 5px;
            display: inline-block;/* 天坑会有bug */
            width: 600px;
            height: 100px;
            background-color: green;
        }
        .box:nth-child(2){
            background: yellow;
        }

    </style>
</head>
<body>
    <div class="container">
    <div class="box">1</div><div class="box">2</div>
    </div>
    
</body>
</html>